<html>
<head>
    <style>
        iframe { width: 400px; height: 200px;}
    </style>
    <script>
        // Set the test up.
        // We take care to perform this before the document is fully loaded so
        // as to avoid a race: the test infrastructure, by default, considers
        // tests to end once they have fully loaded.
        if (window.testRunner) {
            testRunner.dumpAsText();
            testRunner.waitUntilDone();
        }

        window.addEventListener('DOMContentLoaded', () => {
            document.getElementsByTagName('h4')[0].innerHTML = document.domain;

            // Only trigger the test once setup has completed.
            const iframe = document.createElement('iframe');
            iframe.src = 'http://localhost:8000/security/frameNavigation/' +
                'resources/iframe-that-performs-parent-navigation.html';
            document.body.appendChild(iframe);
        });
    </script>
</head>
<body>
    <p>This tests that documents can navigate the location of any of it's
       parent-frames regardless of domain, if a user gesture is present.</p>
    <h4>DOMAIN</h4>
</body>
</html>
